﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Brouteforce.Animation {
    public class ArrowTransition : Transition {
        public Texture2D ArrowTexture;
        public double TextureScale;
        public Vector2 StartPosition;
        public Vector2 EndPosition;

        public ArrowTransition(double duration) : base(duration){}

        //b = 0, c = 1 , t = Time, d = Duration.
        public override void interpolate(Microsoft.Xna.Framework.GameTime time) {
            var t = Time;
            var d = Duration;
            var b = 0;
            var c = 1;
            var ts=(t/=d)*t;
	        var tc=ts*t;
	        Value = b+c*(8.0475*tc*ts + -28.79*ts*ts + 37.885*tc + -20.69*ts + 4.5475*t);
        }
    }
}
